package cn.ywsj.ywsjmidtier.controller;

import cn.ywsj.ywsjmidtier.entity.VO.ApplicationVo;
import cn.ywsj.ywsjmidtier.service.WechatThCommissionApplicationFeign;
import cn.ywsj.ywsjmidtier.utils.JsonObjectUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "资金管理")
@RestController
@RequestMapping("/wechat/member/thcommissionapplication")
public class WechatThCommissionApplicationController {

    @Autowired
    private WechatThCommissionApplicationFeign applicationFeign;

    /**
     * 资金管理_提现
     * @param applicationVo
     * @param result
     * @return
     */
    @ApiOperation("资金管理_提现")
    @PostMapping("/addthcommissionapplication")
    public String addThCommissionApplication(ApplicationVo applicationVo, BindingResult result) {
       return applicationFeign.addThCommissionApplication(JsonObjectUtil.ObjectToJson(applicationVo),result);
    }

    @RequestMapping({"/thcommissionapplicationlist"})
    public String thCommissionApplicationServiceList(Integer start,Integer pageSize) {
       return applicationFeign.thCommissionApplicationServiceList(start,pageSize);
    }
}
